{extend name="common/main"}

{block name="css"}
<!-- 本页面需要额外添加的css请在此处添加 -->
{/block}
{block name="body"}
<body>      
<header>
      <div class="tab_nav">
        <div class="header">
          <div class="h-left"><a class="sb-back" href="{:url('User/index')}" title="返回"></a></div>
          <div class="h-mid">我的评价</div>
          <div class="h-right">
            <aside class="top_bar">
              <div onClick="show_menu();$('#close_btn').addClass('hid');" id="show_more"><a href="javascript:;"></a> </div>
            </aside>
          </div>
        </div>
      </div>
</header>
{include file="common/goods_nav"}
<div id="tbh5v0">
<div class="order">      
      <div class="Evaluation">
            <ul>
              <li><a href="{:url('User/comment',array('status'=>-1))}" class="tab_head {if $status eq -1}on{/if}" name="status" id="goods_ka1" >全部评价</a></li>
              <li><a href="{:url('User/comment',array('status'=>0))}" class="tab_head {if $status eq 0}on{/if} " name="status"id="goods_ka2">待评价</a></li>
              <li><a href="{:url('User/comment',array('status'=>1))}" class="tab_head {if $status eq 1}on{/if} " name="status"id="goods_ka3">已评价</a></li>
            </ul>
      </div>
	<div class="Emain" id="user_goods_ka_1" style="display:block;">
    {foreach name="comment_list" item="vo" key="k"}
    <div class="pingjia">
          <h2>购买时间：{$vo.add_time|date='Y-m-d H:i',###}</h2>
          <dl>
          <dt><img src="{$vo.goods_id|goods_thum_images=200,200}"></dt>
          <dd><span>{$vo.goods_name}</span><strong>￥{$vo.goods_price}</strong></dd>
          <dd>
          	{if condition="$vo['is_comment'] eq 0"}
          	<a class="remark" href="{:url('User/add_comment',array('rec_id'=>$vo['rec_id']))}">评价订单</a>
          	{else/}
          	<a class="remark" href="{:url('User/order_detail',array('id'=>$vo['order_id']))}">查看订单</a>
          	{/if}
          </dd>
          </dl>

		  {if $vo['is_comment'] eq 1}
		 	<div class="pj_main">
                {present name="$vo.goods_rank"}
		       <ul>
		       		<li><em>评价：</em><img src="/mobiled/images/stars{$vo.goods_rank}.png"></li>

		       		<li class="pj_w">{$vo.content|htmlspecialchars_decode}</li>
		       </ul>
                <!--晒单-->
               {/present}
            </div>
		   {/if}
    </div>
  {/foreach}
</div>      
{notempty name="comment_list"}
   <div id="getmore" style="font-size:.24rem;text-align: center;color:#888;padding:.25rem .24rem .4rem; clear:both">
  		<a href="javascript:void(0)" onClick="ajax_sourch_submit()">点击加载更多</a>
  </div>  
{/notempty}
</div>
	<a href="javascript:goTop();" class="gotop"><img src="/mobiled/images/topup.png"></a>
</div>
{include file="common/bar"}
</body>
{/block}

{block name="js"}
<script src="/mobiled/js/common.js"></script>
<script>
var  page = 1;
 /*** ajax 提交表单 查询订单列表结果*/  
 function ajax_sourch_submit()
 {	 	 	 
        page += 1;
        status ={$status};
		$.ajax({
			type : "POST",
			url:"{:url('User/comment')}",
			data : {page:page,status:status},
			success: function(data)
			{
				if($.trim(data) == '')
					$('#getmore').hide();
				else
				    $("#user_goods_ka_1").append(data);
			}
		});
 }
function goTop(){
	$('html,body').animate({'scrollTop':0},600);
}

</script>
{/block}